class Search:
    def linear_search(self, array, item):
        for i in range(len(array)):
            if array[i] == item:
                return i
        return -1

    def binary_search(self, array, item):
        star = 0
        end = len(array) -1
        middle = (end - star) // 2
        while star <= end:
            if array[middle] == item:
                return middle
            elif array[middle] > item:
                end = array[middle]
            elif array[middle] < item:
                star = array[middle]
            middle = (end - star) // 2
            return -1

if __name__ == '__main__':
    search = Search()
    print(search.linear_search([1, 2, 3, 4, 5,11,14,16], 18))